home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Freeware / Gobby 0.4.7 / gobby-0.4.7.exe / {app} / share / gtksourceview-2.0 / language-specs / awk.lang < prev    next >
Extensible Markup Language  |  2008-09-09  |  3KB  |  110 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3.  
  4.  Author: Paolo Borelli <pborelli@gnome.org>
  5.  Copyright (C) 2007 Paolo Borelli
  6.  
  7.  This library is free software; you can redistribute it and/or
  8.  modify it under the terms of the GNU Library General Public
  9.  License as published by the Free Software Foundation; either
  10.  version 2 of the License, or (at your option) any later version.
  11.  
  12.  This library is distributed in the hope that it will be useful,
  13.  but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15.  Library General Public License for more details.
  16.  
  17.  You should have received a copy of the GNU Library General Public
  18.  License along with this library; if not, write to the
  19.  Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  20.  Boston, MA 02111-1307, USA.
  21.  
  22. -->
  23. <language id="awk" _name="awk" version="2.0" _section="Scripts">
  24.   <metadata>
  25.     <property name="mimetypes">application/x-awk</property>
  26.     <property name="globs">*.awk</property>
  27.     <property name="line-comment-start">#</property>
  28.   </metadata>
  29.  
  30.   <styles>
  31.     <style id="keyword" _name="Keyword" map-to="def:keyword"/>
  32.     <style id="pattern" _name="Pattern" map-to="def:preprocessor"/>
  33.     <style id="variable" _name="Variable" map-to="def:identifier"/>
  34.   </styles>
  35.  
  36.   <definitions>
  37.  
  38.     <context id="keywords" style-ref="keyword">
  39.       <keyword>break</keyword>
  40.       <keyword>continue</keyword>
  41.       <keyword>do</keyword>
  42.       <keyword>delete</keyword>
  43.       <keyword>else</keyword>
  44.       <keyword>exit</keyword>
  45.       <keyword>for</keyword>
  46.       <keyword>function</keyword>
  47.       <keyword>getline</keyword>
  48.       <keyword>if</keyword>
  49.       <keyword>next</keyword>
  50.       <keyword>nextfile</keyword>
  51.       <keyword>print</keyword>
  52.       <keyword>printf</keyword>
  53.       <keyword>return</keyword>
  54.       <keyword>while</keyword>
  55.     </context>
  56.  
  57.     <context id="patterns" style-ref="pattern">
  58.       <keyword>BEGIN</keyword>
  59.       <keyword>END</keyword>
  60.     </context>
  61.  
  62.     <context id="variables" style-ref="variable">
  63.       <keyword>ARGC</keyword>
  64.       <keyword>ARGV</keyword>
  65.       <keyword>FILENAME</keyword>
  66.       <keyword>FNR</keyword>
  67.       <keyword>FS</keyword>
  68.       <keyword>NF</keyword>
  69.       <keyword>NR</keyword>
  70.       <keyword>OFMT</keyword>
  71.       <keyword>OFS</keyword>
  72.       <keyword>ORS</keyword>
  73.       <keyword>RLENGTH</keyword>
  74.       <keyword>RS</keyword>
  75.       <keyword>RSTART</keyword>
  76.       <keyword>SUBSEP</keyword>
  77.       <keyword>ARGIND</keyword>
  78.       <keyword>BINMODE</keyword>
  79.       <keyword>CONVFMT</keyword>
  80.       <keyword>ENVIRON</keyword>
  81.       <keyword>ERRNO</keyword>
  82.       <keyword>FIELDWIDTHS</keyword>
  83.       <keyword>IGNORECASE</keyword>
  84.       <keyword>LINT</keyword>
  85.       <keyword>PROCINFO</keyword>
  86.       <keyword>RT</keyword>
  87.       <keyword>RLENGTH</keyword>
  88.       <keyword>TEXTDOMAIN</keyword>
  89.     </context>
  90.  
  91.     <context id="field-variable" style-ref="variable">
  92.       <match>\$\d+</match>
  93.     </context>
  94.  
  95.     <context id="awk">
  96.       <include>
  97.         <context ref="def:shebang"/>
  98.         <context ref="def:shell-like-comment"/>
  99.         <context ref="def:string"/>
  100.         <context ref="keywords"/>
  101.         <context ref="patterns"/>
  102.         <context ref="variables"/>
  103.         <context ref="field-variable"/>
  104.       </include>
  105.     </context>
  106.  
  107.   </definitions>
  108.  
  109. </language>
  110.